package com.lm.paymentweb.controller;

import com.lm.paymentweb.TestService;
import com.lm.paymentweb.common.Result;
import com.lm.paymentweb.remote.UserRemote;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.Map;

/**
 * @author liu2dog
 */
@Controller
@RequestMapping(value = "user")
@Slf4j
public class UserController {
    @Resource
    private UserRemote userRemote;

    @Resource
    private TestService testService;

    @PostMapping(value = "/sendEmail")
    @ResponseBody
    public Result sendEmail(){
        log.info("------");
        return userRemote.sendEmail("1163017562@qq.com");
    }

    @PostMapping(value = "/testSeata")
    @ResponseBody
    public Result testSeata() throws Exception {
        testService.test();
        return Result.ok("");
    }



}
